import requests
from bs4 import BeautifulSoup

url = 'https://movie.douban.com/top250/'

headers = {
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36'
}

response = requests.get(url, headers=headers)
return response.content.decode("gbk")

